#include <stdlib.h>

struct async_io {
  int fd;
  char* (*async_read) (struct async_io* self);
  int (*async_write) (struct async_io* self, const char* data);
  void (*close_fd) (struct async_io* self);
};

typedef struct async_io* async_op;

char* read_data (async_op self);
int write_data (async_op self, const char* data);
void close_fd (async_op fd);

async_op new_async_fd (const char* file_path);

